<% content_for :css do %>
  <%= stylesheet_link_tag 'enterprises_edit' %>
<% end %>
<% content_for :title do %>编辑企业基本资料<% end %>
<%= form_for @enterprise,
      :html => {
        :id => :enterprise_form
      } do |f| %>
<div class="grid_16 enterprise">
  <div class="grid_16 head alpha omega">
    <div class="grid_16 title">
      编辑企业基本资料
    </div>          
    <div class="grid_16 line">
      <div class="grid_2">名称</div>
      <div class="grid_12"><%= f.text_field :name %></div>
    </div>
    <div class="grid_16 line">
      <div class="grid_2">管理员</div>
      <div class="grid_12">
        <%= f.select :admin_id,options_from_collection_for_select(@enterprise.users, 'id', 'full_name') %>
      </div>
    </div> 
  </div>
  <div class="grid_16 alpha body">  
    <div class="grid_16 line">
      <div class="grid_2">联系电话</div>
      <div class="grid_12">
        <%= f.label :link_phone, '添加联系电话描述', :id => :label_for_enterprise_link_phone, :class => @enterprise.link_phone.blank? ? '' : :hidden %>
        <%= f.text_field :link_phone %>
        <%= label_js_for :enterprise_link_phone %>
      </div>
    </div>  
    <div class="grid_16 line">
      <div class="grid_2">传真</div>
      <div class="grid_12">
        <%= f.label :fax, '添加传真描述', :id => :label_for_enterprise_fax, :class => @enterprise.fax.blank? ? '' : :hidden %>
        <%= f.text_field :fax %>
        <%= label_js_for :enterprise_fax %>
      </div>
    </div> 
    <div class="grid_16 line">
      <div class="grid_2">电邮</div>
      <div class="grid_12">
        <%= f.label :email, '添加电子邮件描述', :id => :label_for_enterprise_email, :class => @enterprise.fax.blank? ? '' : :hidden %>
        <%= f.text_field :email %>
        <%= label_js_for :enterprise_email %>
      </div>
    </div> 
    <div class="grid_16 line">
      <div class="grid_2">地址</div>
      <div class="grid_12">
        <%= f.label :address, '添加单位地址描述', :id => :label_for_enterprise_address, :class => @enterprise.address.blank? ? '' : :hidden %>
        <%= f.text_field :address %>
        <%= label_js_for :enterprise_address %>
      </div>
    </div> 
    <div class="grid_16 line">
      <div class="grid_2">客服QQ</div>
      <div class="grid_12">
        <%= f.label :qq, '添加客服QQ描述', :id => :label_for_enterprise_qq, :class => @enterprise.qq.blank? ? '' : :hidden %>
        <%= f.text_field :qq %>
        <%= label_js_for :enterprise_qq %>
      </div>
    </div> 
    <div class="grid_16 line">
      <div class="grid_2">简介</div>
      <div class="grid_12">
        <%= f.label :qq, '添加简介描述', :id => :label_for_enterprise_synopsis, :class => @enterprise.synopsis.blank? ? '' : :hidden %>
        <%= f.text_area :synopsis %>
        <%= label_js_for :enterprise_synopsis %>
      </div>
    </div> 
  </div>
  <div class="grid_16 bottom">
    <div class="grid_10">
      <%= f.submit '更新该基本资料' %><small>或</small><%= link_to "返回", enterprise_url(@enterprise)   %>
    </div>
  </div>  
</div>
<% end %>